home *** CD-ROM | disk | FTP | other *** search
/ Mac Power 1996 September / MACPOWER-1996-09.ISO.7z / MACPOWER-1996-09.ISO / 第2特集:プラグイン大集合 / PIC2 Save / PIC2PlugIn.h < prev    next >
Text File  |  1995-01-16  |  2KB  |  108 lines

  1. /*
  2.     File: pic2plug.h
  3.  
  4.     Copyright © 1994 K&M Software Corporation (番犬 JBE01713@nifty)
  5.     Portions  © 1992 Adobe Systems Incorporated
  6.                      Apple Computer, Inc.
  7.               © 1994 Metrowerks, Inc.
  8.     PIC2 Format ©         やなぎさわ
  9.  
  10.     1994/11/06    new!
  11. */
  12.  
  13. #pragma once
  14.  
  15. // for memcmp, memcpy, memset
  16. #include    <string.h>
  17. #include    <setjmp.h>
  18.  
  19. #ifdef MPW
  20.  
  21. #include <Types.h>
  22. #include <Events.h>
  23. #include <Memory.h>
  24. #include <Resources.h>
  25. #include <Quickdraw.h>
  26. #include <Controls.h>
  27. #include <Dialogs.h>
  28. #include <OSUtils.h>
  29. #include <Packages.h>
  30. #include <Errors.h>
  31. #include <ToolUtils.h>
  32.  
  33. #define TRUE 1
  34. #define FALSE 0
  35.  
  36. #endif
  37.  
  38. #include "ExportInterface.h"
  39.  
  40. /*****************************************************************************/
  41. /* Global variables */
  42.  
  43.  
  44. typedef struct GlobalData
  45. {
  46.  
  47.     ExportRecordPtr    stuff;
  48.     short            result;
  49.     Byte*            pixelData;
  50.  
  51.     long            rowBytes;
  52.     long            filesize;
  53.     short            BitsDepth;            // copy of p2->header.depth
  54.     FSSpec            theSpec;            // File Spec
  55.     P2*                p2;
  56.     short            colorMode,compressMode;
  57.  
  58.     char            title[64];
  59.     char            comment[256];
  60.     char            author[32];
  61.     short            picindex;
  62.  
  63.     short            cLine;
  64.     pix                *Pixel;
  65.     long            partial,total;
  66.     Boolean            buffer_end;
  67. } Globals, *GPtr, **GHdl;
  68.  
  69. /*****************************************************************************/
  70.  
  71. #define gStuff       ((**globals).stuff)
  72. #define gResult      ((**globals).result)
  73.  
  74. #define gPixelData   ((**globals).pixelData)
  75. #define gRowBytes    ((**globals).rowBytes)
  76.  
  77. /*****************************************************************************/
  78.  
  79. #define    kStringID    17000
  80. #define    kStrSavePromptItem    1
  81. #define    kStrMemErrItem        2
  82. #define kStrSaverItem        3
  83. #define    kStrCreatorID        4
  84. #define    kStrTypeID            5
  85. #define    kStrEOFErrItem        6
  86. #define    kStrFormatErrItem    7
  87.  
  88. #define    kAboutDialogID    17000
  89. #define    kErrorDialogID    17001
  90. #define kMainDialogID    17002
  91.  
  92.  
  93. #define    cPIC2SaveVersion    "¥p1.1"
  94.  
  95. #ifdef __MWERKS__
  96. #define    ENTRYPOINT    main
  97. #endif
  98.  
  99. #if    defined(MainModule)
  100. #define GlobalDef
  101. #else
  102. #define GlobalDef extern
  103. #endif
  104.  
  105. #undef GlobalDef
  106.  
  107. #include "Prototypes.h"
  108.